#!/bin/sh

wall_dir=~/pix/wall

if [ -z "$1" ]; then
	wall="$(find "$wall_dir" -type f -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" | shuf -n1)"
else
	wall="$1"
fi

convert "$wall" ~/.local/share/bg.jpg
xwallpaper --zoom ~/.local/share/bg.jpg
